 {if $smarty.get.print != 1}
  {include file="header.tpl"}
{else}
  {include file="headerPrint.tpl"}
{/if}
<head>
<style>
.aavakColor
{
  color:red;
}
.javakColor
{
  color:green;
}
</style>	
<script type="text/javascript">
function deletechecked()
    {
      var answer = confirm("Delete Selected Recored ?")
      var answer1 = confirm("Are You Sure ?")
      if (answer && answer1)
      {
        document.messages.submit();
      }
      return false;
    }
 </script>
 </head>
<form name="form1" action="" method="post">

<input type="hidden" name="rojmelId" value="{$rojmelId}" />
{$l_from} : {html_select_date prefix="fromDate" start_year="-2" end_year="+1" field_order="DMY" time=$fromDate day_value_format="%02d"}
{$l_to} : {html_select_date prefix="toDate" start_year="-2" end_year="+1" field_order="DMY" time=$toDate day_value_format="%02d"}&nbsp;&nbsp;&nbsp;
<input type="submit" name="find" value="{$l_find}" />
<div class="contentDiv">
  <table border="0" align="center" width="100%" cellspacing="0" cellpadding="2">
    <tr class="table1">
      <th colspan="4" class="aavakColor">{$l_credit}</th>
      <th>&nbsp;</th>
      <th colspan="4" class="javakColor">{$l_debit}</th>
    </tr>
    <tr>
      <td colspan="4" vAlign="top">
        <table border="0" align="center" width="100%" cellspacing="0" cellpadding="1" class="aavakColor">
          <tr class="table1">
            <th>&nbsp;</th>
            <th align="left">{$l_date}</th>
            {if $smarty.get.print != 1}
            <th align="left">{$l_particulars}</th>
            {else}
            <th align="left">Parti</th>
            {/if}
            <th align="right">{$l_fine}</th>
            <th align="right">{$l_amount}</th>
          </tr>
          <tr class="table2">
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td>{$opening.particular}</td>
            <td align="right">{if $finalFineOpeningCr != 0}{$finalFineOpeningCr|string_format:"%.0f"}{else}&nbsp;{/if}</td>
            <td align="right">{if $finalAmountOpeningCr != 0}{$finalAmountOpeningCr|string_format:"%.0f"}{else}&nbsp;{/if}</td>
          </tr>
          {section name="sec" loop=$rojmelDetailArray|@count}
            <tr class="table2">
              <td>
                {if $smarty.get.print != 1}
                  <a href="rojmelDelete.php?rojmelId={$rojmelDetailArray[sec].rojmelIdCr}&rojmel=1" onClick="return deletechecked();"><img src="./images/b_drop.png" border="0" width="15" height="15"></a>
                  <a href="rojmelEntry.php?rojmelId={$rojmelDetailArray[sec].rojmelIdCr}"><img src="./images/b_edit.png" border="0" width="15" height="15"></a>
                {else}
                  &nbsp;
                {/if}
              </td>
              <td NOWRAP>{$rojmelDetailArray[sec].rojmelDateCr|date_format:"%e-%b-%Y"}</td>
              <td>( {$rojmelDetailArray[sec].partyNameCr} )&nbsp; {$rojmelDetailArray[sec].particularCr}</td>
              <td align="right" style="border-right:1px solid;">{if $rojmelDetailArray[sec].fineCr != 0}{$rojmelDetailArray[sec].fineCr|string_format:"%.0f"}{else}&nbsp;{/if}</td>
              <td align="right">{if $rojmelDetailArray[sec].amountCr != 0}{$rojmelDetailArray[sec].amountCr|string_format:"%.0f"}{else}&nbsp;{/if}</td>
            </tr>
          {/section}
          <tr>
            <td colspan="10"><hr style="color: #778899; background-color: #778899;" /></td>
          </tr>
          <tr class="table2">
          	<th>&nbsp;</th>
          	<th>&nbsp;</th>
            <th>{$l_total}</th>
            <th align="right">{if $totalCrFine != 0}{$totalCrFine|string_format:"%.0f"}{else}{$total.crFine|string_format:"%.0f"}{/if}</th>
            <th align="right">{if $totalCrAmount != 0}{$totalCrAmount|string_format:"%.0f"}{else}{$total.crAmount|string_format:"%.0f"}{/if}</th>
          </tr>
          <tr><hr style="color: #778899; background-color: #778899;" /></tr>
        </table>
        <td>&nbsp;</td><td>&nbsp;</td>
        <td style="border-left: 1px solid black; padding: 5px;">
        <td colspan="4" vAlign="top">
        <table border="0" align="center" width="100%" cellspacing="0" cellpadding="1" class="javakColor">
          <tr class="table1"><hr style="color: #778899; background-color: #778899;" />
            <th>&nbsp;</th>
            <th align="left">{$l_date}</th>
            {if $smarty.get.print != 1}
            <th align="left">{$l_particulars}</th>
            {else}
            <th align="left">Parti</th>
            {/if}
            <th align="right">{$l_fine}</th>
            <th align="right">{$l_amount}</th>
          </tr>
          <tr class="table2">
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td>{$opening.particular}</td>
            <td align="right">{if $finalFineOpeningDr != 0}{$finalFineOpeningDr|string_format:"%.0f"}{else}&nbsp;{/if}</td>
            <td align="right">{if $finalAmountOpeningDr != 0}{$finalAmountOpeningDr|string_format:"%.0f"}{else}&nbsp;{/if}</td>
          </tr>
          {section name="sec" loop=$rojmelDetailArray|@count}
            <tr class="table2">
              <td>
                {if $smarty.get.print != 1}
                  <a href="rojmelDelete.php?rojmelId={$rojmelDetailArray[sec].rojmelId}&rojmel=1" onClick="return deletechecked();"><img src="./images/b_drop.png" border="0" width="15" height="15"></a>
                  <a href="rojmelEntry.php?rojmelId={$rojmelDetailArray[sec].rojmelId}"><img src="./images/b_edit.png" border="0" width="15" height="15"></a>
                {else}
                  &nbsp;
                {/if}
              </td>
              <td NOWRAP>{$rojmelDetailArray[sec].rojmelDate|date_format:"%e-%b-%Y"}</td>
              <td>( {$rojmelDetailArray[sec].partyName} )&nbsp; {$rojmelDetailArray[sec].particular}</td>
              <td align="right" style="border-right:1px solid;">{if $rojmelDetailArray[sec].fineDr != 0}{$rojmelDetailArray[sec].fineDr|string_format:"%.0f"}{else}&nbsp;{/if}</td>
              <td align="right">{if $rojmelDetailArray[sec].amountDr != 0}{$rojmelDetailArray[sec].amountDr|string_format:"%.0f"}{else}&nbsp;{/if}</td>
            </tr>
          {/section}
          <tr>
            <td colspan="10"><hr style="color: #778899; background-color: #778899;" /></td>
          </tr>
          <tr class="table2">
            <th>&nbsp;</th>
            <th>&nbsp;</th>
            <th>{$l_total}</th>
            <th align="right">{if $totalDrFine != 0}{$totalDrFine|string_format:"%.0f"}{else}{$total.drFine|string_format:"%.0f"}{/if}</th>
            <th align="right">{if $totalDrAmount != 0}{$totalDrAmount|string_format:"%.0f"}{else}{$total.drAmount|string_format:"%.0f"}{/if}</th>
          </tr>
        </table>
      </td>
    </tr>
    <tr><hr style="color: #778899; background-color: #778899;" /></tr>
    <tr><td colspan="10"><hr style="color: #778899; background-color: #778899;" /></td></tr>
    <tr>
      <td colspan="9">
        <b style="color:green;">{if $netFine >= 0} Total Debit Fine:{else}</b><b style="color:red;"> Total Credit Fine:{/if} {$netFine|string_format:"%.0f"}</b>&nbsp;&nbsp;&nbsp;&nbsp;
        <b style="color:green;">{if $netAmount >= 0} Total Debit Amount:{else}</b><b style="color:red;"> Total Credit Amount:{/if}  {$netAmount|string_format:"%.0f"}</b>
      </td>
    </tr>
  </table>
</div>
</form>
{if $smarty.get.print != 1}
  {include file="footer.tpl"}
{/if}